package com.edu.networkexperimentation.model.algorithm;

import com.edu.networkexperimentation.model.domain.Question;
import lombok.Data;

import java.util.List;

@Data
public class PaperResult {
    private double fitness;
    private double difficulty;
    private int questionNum;
    private double knowledgeCoverage;
    private int iterationNum;
    private String maxFitness;
    private String averageFitness;
    private List<Question> questions;

    public PaperResult(double difficulty, double fitness, int questionNum, int iterationNum, double knowledgeCoverage) {
        this.difficulty = difficulty;
        this.fitness = fitness;
        this.questionNum = questionNum;
        this.questions = questions;
        this.iterationNum = iterationNum;
        this.knowledgeCoverage = knowledgeCoverage;
    }
    public PaperResult(Individual individual, int iterationNum, double knowledgeCoverage) {
        this.difficulty = individual.getDifficulty();
        this.fitness = individual.getFitness();
        this.questionNum = individual.getQuestions().size();
        this.questions = individual.getQuestions();
        this.iterationNum = iterationNum;
        this.knowledgeCoverage = knowledgeCoverage;
    }
}
